﻿using System;
using System.Text;
using System.Drawing;
using System.Buffers;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;

public static partial class glDRIVE
{
    /*
    F_分布函数
    
    f：f随机变量值。要求f>=0。
    n1：n1自由度。
    n2：n2自由度。
    返回F分布函数值。
    */

    public static string drive_ffff()
    {
        int n1, n2, i;
        double y, f;
        int[] n = new int[2] { 2, 5 };
        int[] m = new int[2] { 3, 10 };
        StringBuilder sb = new StringBuilder();
        for (i = 0; i <= 1; i++)
        {
            n1 = n[i];
            n2 = m[i];
            f = 3.5;
            y = gl.ffff(f, n1, n2);
            sb.AppendLine("P(" + f + ", " + n1 + ", " + n2 + ")=" + y + "<br>");
            f = 9.0;
            y = gl.ffff(f, n1, n2);
            sb.AppendLine("P(" + f + ", " + n1 + ", " + n2 + ")=" + y + "<br>");
        }
        return sb.ToString();
    }
}